package com.aceitunaproject.server.unit;



import com.aceitunaproject.server.exceptions.gamerules.IllegalActionException;

/**
 * Unit manager interface implementation
 * 
 * @author Maciej Miechowicz
 */
public class UnitManagerImpl implements UnitManager {

	// TODO: miechus please check if this is correct.
	
	private UnitService service;

	// private UnitService service;

	/**
	 * Creates a new instance of the manager
	 * 
	 * @param service
	 *            backing unit service
	 */
	public UnitManagerImpl(UnitService service) {
		this.service = service;
	}

	/**
	 * {@inheritDoc}
	 */
	public void moveUnit(long unitId, long destinationX, long destinationY)
			throws IllegalActionException {

		service.moveUnit(unitId, destinationX, destinationY);
				
	}

}
